var express = require('express');
var router = express.Router();
const { get,update,search} = require("../service/orderService.js")


router.post('/getOrder', async function (req, res, next) {
  const data = await get();
  res.send(data);
});

router.post('/updateOrder', async function (req, res, next) {
  const {parameter} = req.body;
  const data = await update(parameter);
  res.send(data);
});

router.post('/searchOrder', async function (req, res, next) {
  const {parameter} = req.body;
  const data = await search(parameter);
  res.send(data);
});

module.exports = router;